package com.xia.service.impl;

import com.xia.mapper.CategoryMapper;
import com.xia.pojo.Category;
import com.xia.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CategoryServiceImpl implements CategoryService {

    @Autowired
    public CategoryMapper categoryMapper;

    @Override
    public List<Category> listCategory() {
        return categoryMapper.listCategory();
    }

    @Override
    public void updateCategory(Category category) {
        categoryMapper.updateCategory(category);
    }

    @Override
    public void delCategory(Integer cid) {
        categoryMapper.delCategory(cid);
    }

    @Override
    public void addType(Category category) {
        categoryMapper.addType(category);
    }
}
